3.10.21 \(\int \frac {(a+b x)^n (c+d x)}{x} \, dx\) [921]

Optimal. Leaf size=56 \[ \frac {d (a+b x)^{1+n}}{b (1+n)}-\frac {c (a+b x)^{1+n} \, _2F_1\left (1,1+n;2+n;1+\frac {b x}{a}\right )}{a (1+n)} \]

[Out]

d*(b*x+a)^(1+n)/b/(1+n)-c*(b*x+a)^(1+n)*hypergeom([1, 1+n],[2+n],1+b*x/a)/a/(1+n)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {81, 67} \begin {gather*} \frac {d (a+b x)^{n+1}}{b (n+1)}-\frac {c (a+b x)^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b x}{a}+1\right )}{a (n+1)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*x)^n*(c + d*x))/x,x]

[Out]

(d*(a + b*x)^(1 + n))/(b*(1 + n)) - (c*(a + b*x)^(1 + n)*Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (b*x)/a])/(a*(
1 + n))

Rule 67

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))
*Hypergeometric2F1[-m, n + 1, n + 2, 1 + d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (Intege
rQ[m] || GtQ[-d/(b*c), 0])

Rule 81

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[b*(c + d*x)^
(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rubi steps

\begin {align*} \int \frac {(a+b x)^n (c+d x)}{x} \, dx &=\frac {d (a+b x)^{1+n}}{b (1+n)}+c \int \frac {(a+b x)^n}{x} \, dx\\ &=\frac {d (a+b x)^{1+n}}{b (1+n)}-\frac {c (a+b x)^{1+n} \, _2F_1\left (1,1+n;2+n;1+\frac {b x}{a}\right )}{a (1+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 45, normalized size = 0.80 \begin {gather*} \frac {(a+b x)^{1+n} \left (a d-b c \, _2F_1\left (1,1+n;2+n;1+\frac {b x}{a}\right )\right )}{a b (1+n)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x)^n*(c + d*x))/x,x]

[Out]

((a + b*x)^(1 + n)*(a*d - b*c*Hypergeometric2F1[1, 1 + n, 2 + n, 1 + (b*x)/a]))/(a*b*(1 + n))

________________________________________________________________________________________

Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {\left (b x +a \right )^{n} \left (d x +c \right )}{x}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^n*(d*x+c)/x,x)

[Out]

int((b*x+a)^n*(d*x+c)/x,x)

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n*(d*x+c)/x,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(n>0)', see `assume?` for more
details)Is n

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n*(d*x+c)/x,x, algorithm="fricas")

[Out]

integral((d*x + c)*(b*x + a)^n/x, x)

________________________________________________________________________________________

Sympy [A]
time = 2.75, size = 170, normalized size = 3.04 \begin {gather*} - \frac {b^{n} c n \left (\frac {a}{b} + x\right )^{n} \Phi \left (1 + \frac {b x}{a}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{\Gamma \left (n + 2\right )} - \frac {b^{n} c \left (\frac {a}{b} + x\right )^{n} \Phi \left (1 + \frac {b x}{a}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{\Gamma \left (n + 2\right )} + d \left (\begin {cases} a^{n} x & \text {for}\: b = 0 \\\frac {\begin {cases} \frac {\left (a + b x\right )^{n + 1}}{n + 1} & \text {for}\: n \neq -1 \\\log {\left (a + b x \right )} & \text {otherwise} \end {cases}}{b} & \text {otherwise} \end {cases}\right ) - \frac {b b^{n} c n x \left (\frac {a}{b} + x\right )^{n} \Phi \left (1 + \frac {b x}{a}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{a \Gamma \left (n + 2\right )} - \frac {b b^{n} c x \left (\frac {a}{b} + x\right )^{n} \Phi \left (1 + \frac {b x}{a}, 1, n + 1\right ) \Gamma \left (n + 1\right )}{a \Gamma \left (n + 2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**n*(d*x+c)/x,x)

[Out]

-b**n*c*n*(a/b + x)**n*lerchphi(1 + b*x/a, 1, n + 1)*gamma(n + 1)/gamma(n + 2) - b**n*c*(a/b + x)**n*lerchphi(
1 + b*x/a, 1, n + 1)*gamma(n + 1)/gamma(n + 2) + d*Piecewise((a**n*x, Eq(b, 0)), (Piecewise(((a + b*x)**(n + 1
)/(n + 1), Ne(n, -1)), (log(a + b*x), True))/b, True)) - b*b**n*c*n*x*(a/b + x)**n*lerchphi(1 + b*x/a, 1, n +
1)*gamma(n + 1)/(a*gamma(n + 2)) - b*b**n*c*x*(a/b + x)**n*lerchphi(1 + b*x/a, 1, n + 1)*gamma(n + 1)/(a*gamma
(n + 2))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n*(d*x+c)/x,x, algorithm="giac")

[Out]

integrate((d*x + c)*(b*x + a)^n/x, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {{\left (a+b\,x\right )}^n\,\left (c+d\,x\right )}{x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*x)^n*(c + d*x))/x,x)

[Out]

int(((a + b*x)^n*(c + d*x))/x, x)

________________________________________________________________________________________